using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Logging;
using SemanticKernelBlazorDemo.Core.Services;

namespace SemanticKernelBlazorDemo.Shared.Pages;

public partial class Writer {
    [Inject] private IWriterService _writerService { get; init; }
    [Inject] private ILogger<Writer> _logger { get; init; }

    private string _topic = string.Empty;

    private string _article = string.Empty;

    private async Task WriteAsync() {
        _article = await _writerService.TopicWriteAsync(_topic);
        StateHasChanged();
    }
}